import {createStore} from "vuex";

import { createApp } from 'vue'
import App from './App.vue'

const app = createApp(App)
const store = createStore({
    state() {
        return {
            count: 0
        }
    },
    mutations: {
        increment(state, payload) {
            state.count += payload.step
        }
    },
    getters: {
        countText(state) {
            return (s) => {
                if (s) return state.count + s;
                return state.count + "dwafa"
            }
        }
    }
})
app.use(store)
app.mount('#app')
